﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.DropDownList, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.VirtualUIObject, "ScriptType"))

	_DB:AddCodeHelp("OnHide", [[ScriptType, Run when the DropDownList's visbility changes to hidden]], [[OnHide()]])
	_DB:AddCodeHelp("OnEnter", [[ScriptType, Run when the mouse cursor enters the DropDownList's interactive area]], [[OnEnter()]])
	_DB:AddCodeHelp("OnShow", [[ScriptType, Run when the DropDownList becomes visible]], [[OnShow()]])
	_DB:AddCodeHelp("OnLeave", [[ScriptType, Run when the mouse cursor leaves the DropDownList's interactive area]], [[OnLeave()]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.DropDownList, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.VirtualUIObject, "Function"))

	_DB:AddCodeHelp("GetID", [=[Returns the frame's numeric identifier]=], [=[GetID()]=])
	_DB:AddCodeHelp("GetMenuButton", [=[get a dropDownMenuButton with the given name]=], [=[GetMenuButton(name)]=])
	_DB:AddCodeHelp("GetEffectiveScale", [=[Returns the overall scale factor of the frame]=], [=[GetEffectiveScale()]=])
	_DB:AddCodeHelp("SetBackdropBorderColor", [=[Sets a shading color for the frame's border graphic]=], [=[SetBackdropBorderColor(red, green, blue [, alpha])]=])
	_DB:AddCodeHelp("GetWidth", [=[Returns the width of the region]=], [=[GetWidth()]=])
	_DB:AddCodeHelp("Hide", [=[Hides the region]=], [=[Hide()]=])
	_DB:AddCodeHelp("EnableDrawLayer", [=[Allows display of all child objects of the frame on a specified graphics layer]=], [=[EnableDrawLayer("layer")]=])
	_DB:AddCodeHelp("GetNumPoints", [=[Returns the number of anchor points defined for the region]=], [=[GetNumPoints()]=])
	_DB:AddCodeHelp("IsShown", [=[Returns whether the region is shown]=], [=[IsShown()]=])
	_DB:AddCodeHelp("IsDragging", [=[Returns whether the region is currently being dragged]=], [=[IsDragging()]=])
	_DB:AddCodeHelp("Show", [=[Shows the region]=], [=[Show()]=])
	_DB:AddCodeHelp("GetHeight", [=[Returns the height of the region]=], [=[GetHeight()]=])
	_DB:AddCodeHelp("GetBackdrop", [=[Returns information about the frame's backdrop graphic]=], [=[GetBackdrop()]=])
	_DB:AddCodeHelp("SetHitRectInsets", [=[Sets the insets from the frame's edges which determine its mouse-interactable area]=], [=[SetHitRectInsets(left, right, top, bottom)]=])
	_DB:AddCodeHelp("GetClampRectInsets", [=[Returns offsets from the frame's edges used when limiting user movement or resizing of the frame]=], [=[GetClampRectInsets()]=])
	_DB:AddCodeHelp("GetRight", [=[Returns the distance from the left edge of the screen to the right edge of the region]=], [=[GetRight()]=])
	_DB:AddCodeHelp("GetNumChildren", [=[Returns the number of child frames belonging to the frame]=], [=[GetNumChildren()]=])
	_DB:AddCodeHelp("IgnoreDepth", [=[Sets whether the frame's depth property is ignored (for stereoscopic 3D setups)]=], [=[IgnoreDepth(enable)]=])
	_DB:AddCodeHelp("GetLeft", [=[Returns the distance from the left edge of the screen to the left edge of the region]=], [=[GetLeft()]=])
	_DB:AddCodeHelp("DisableDrawLayer", [=[Prevents display of all child objects of the frame on a specified graphics layer]=], [=[DisableDrawLayer("layer")]=])
	_DB:AddCodeHelp("IsIgnoringDepth", [=[Returns whether the frame's depth property is ignored (for stereoscopic 3D setups)]=], [=[IsIgnoringDepth()]=])
	_DB:AddCodeHelp("GetChildren", [=[Returns a list of child frames of the frame]=], [=[GetChildren()]=])
	_DB:AddCodeHelp("GetHitRectInsets", [=[Returns the insets from the frame's edges which determine its mouse-interactable area]=], [=[GetHitRectInsets()]=])
	_DB:AddCodeHelp("GetBottom", [=[Returns the distance from the bottom of the screen to the bottom of the region]=], [=[GetBottom()]=])
	_DB:AddCodeHelp("GetDepth", [=[Returns the 3D depth of the frame (for stereoscopic 3D setups)]=], [=[GetDepth()]=])
	_DB:AddCodeHelp("SetClampRectInsets", [=[Sets offsets from the frame's edges used when limiting user movement or resizing of the frame]=], [=[SetClampRectInsets(left, right, top, bottom)]=])
	_DB:AddCodeHelp("GetEffectiveDepth", [=[Returns the overall 3D depth of the frame (for stereoscopic 3D configurations)]=], [=[GetEffectiveDepth()]=])
	_DB:AddCodeHelp("SetPoint", [=[Sets an anchor point for the region]=], [=[SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]])]=])
	_DB:AddCodeHelp("GetEffectiveAlpha", [=[Returns the overall opacity of the frame]=], [=[GetEffectiveAlpha()]=])
	_DB:AddCodeHelp("ClearAllPoints", [=[Removes all anchor points from the region]=], [=[ClearAllPoints()]=])
	_DB:AddCodeHelp("IsVisible", [=[Returns whether the region is visible]=], [=[IsVisible()]=])
	_DB:AddCodeHelp("SetDepth", [=[Sets the 3D depth of the frame (for stereoscopic 3D configurations)]=], [=[SetDepth(depth)]=])
	_DB:AddCodeHelp("RemoveMenuButton", [=[remove dropDownMenuButton with the given name]=], [=[RemoveMenuButton(name)]=])
	_DB:AddCodeHelp("AddMenuButton", [=[Add or get a dropDownMenuButton with the given name]=], [=[AddMenuButton(name)]=])
	_DB:AddCodeHelp("SetID", [=[Sets a numeric identifier for the frame]=], [=[SetID(id)]=])
	_DB:AddCodeHelp("Dispose", [=[Dispose, release resource]=], [=[Dispose()]=])
	_DB:AddCodeHelp("GetTop", [=[Returns the distance from the bottom of the screen to the top of the region]=], [=[GetTop()]=])
	_DB:AddCodeHelp("GetBackdropColor", [=[Returns the shading color for the frame's background graphic]=], [=[GetBackdropColor()]=])
	_DB:AddCodeHelp("GetBackdropBorderColor", [=[Returns the shading color for the frame's border graphic]=], [=[GetBackdropBorderColor()]=])
	_DB:AddCodeHelp("GetPoint", [=[Returns information about one of the region's anchor points]=], [=[GetPoint(index)]=])
	_DB:AddCodeHelp("SetBackdrop", [=[Sets a backdrop graphic for the frame]=], [=[SetBackdrop(backdrop)]=])
	_DB:AddCodeHelp("GetRect", [=[Returns the position and dimensions of the region]=], [=[GetRect()]=])
	_DB:AddCodeHelp("SetBackdropColor", [=[Sets a shading color for the frame's background graphic]=], [=[SetBackdropColor(red, green, blue [, alpha])]=])
	_DB:AddCodeHelp("GetCenter", [=[Returns the screen coordinates of the region's center]=], [=[GetCenter()]=])
	_DB:AddCodeHelp("SetAllPoints", [=[Sets all anchor points of the region to match those of another region]=], [=[SetAllPoints(["name"])]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.DropDownList, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.VirtualUIObject, "Property"))

	_DB:AddCodeHelp("Alpha", [[Set or get the frame's transparency value(0-1)]], IGAS:GetPropertyType("Alpha"))
	_DB:AddCodeHelp("Visible", [[the visible of the dropdownlist]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("MultiSelect", [[whether the dropdownlist can select mult-checkbuttons]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Backdrop", [[the backdrop graphic for the dropdownlist]], IGAS:GetPropertyType("Backdrop"))
	_DB:AddCodeHelp("Width", [[the width of the dropdownlist]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("BackdropBorderColor", [[the shading color for the dropdownlist's border graphic]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("ClampRectInsets", [[offsets from the dropdownlist's edges used when limiting user movement or resizing of the dropdownlist]], IGAS:GetPropertyType("RectInset"))
	_DB:AddCodeHelp("ID", [[a numeric identifier for the dropdownlist]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("HitRectInsets", [[the insets from the dropdownlist's edges which determine its mouse-interactable area]], IGAS:GetPropertyType("RectInset"))
	_DB:AddCodeHelp("ShowOnCursor", [[whether show the dropdownlist at the cursor's position]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Depth", [[the 3D depth of the dropdownlist (for stereoscopic 3D setups)]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("BackdropColor", [[the shading color for the dropdownlist's background graphic]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("Height", [[the height of the dropdownlist]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("DepthIgnored", [[whether the dropdownlist's depth property is ignored (for stereoscopic 3D setups)]], IGAS:GetPropertyType("boolean"))
	
	
	------------------------------------------------------------
	-- DropDownMenuButton
	------------------------------------------------------------
	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.DropDownList.DropDownMenuButton, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Button, "ScriptType"))

	_DB:AddCodeHelp("OnCheckChanged", [[ScriptType, Run when the button's checking state is changed]], [[OnCheckChanged()]])
	_DB:AddCodeHelp("OnColorPicked", [[ScriptType, Run when the color is selected]], [[OnColorPicked(red, green, blue, alpha)]])
	_DB:AddCodeHelp("OnColorPickerShow", [[ScriptType, Run when the color picker is shown, used to set the default color]], [[OnColorPickerShow(colorPicker)]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.DropDownList.DropDownMenuButton, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Button, "Function"))

	_DB:AddCodeHelp("AddMenuButton", [=[Add or get a dropDownMenuButton with the given name list]=], [=[AddMenuButton(...)]=])
	_DB:AddCodeHelp("GetMenuButton", [=[get a dropDownMenuButton with the given name list]=], [=[GetMenuButton(...)]=])
	_DB:AddCodeHelp("RemoveMenuButton", [=[remove dropDownMenuButton with the given name list]=], [=[RemoveMenuButton(...)]=])
	_DB:AddCodeHelp("SetDropDownList", [=[Set the sub menu for the button]=], [=[SetDropDownList(dropDownList)]=])
	_DB:AddCodeHelp("GetDropDownList", [=[Get the sub menu for the button]=], [=[GetDropDownList()]=])
	_DB:AddCodeHelp("SetIcon", [=[Set the icon to be displayed on the button]=], [=[SetIcon(path)]=])
	_DB:AddCodeHelp("GetIcon", [=[Get the icon to be displayed on the button]=], [=[GetIcon()]=])
	_DB:AddCodeHelp("SetTextColor", [=[Set the text color for the button]=], [=[SetTextColor(red, green, blue)]=])
	_DB:AddCodeHelp("GetTextColor", [=[Get the text color for the button]=], [=[GetTextColor()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.DropDownList.DropDownMenuButton, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Button, "Property"))

	_DB:AddCodeHelp("Index", [[the index of this dropDownMenuButton]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("TextColor", [[the text color of the button]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("Icon", [[that to be displayed on the button]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("DropDownList", [[the sub menu binds to the button]], IGAS:GetPropertyType("DropDownList"))
	_DB:AddCodeHelp("Text", [[the text to be displayed on the button]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("IsCheckButton", [[whether the button is using as a checkbutton]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Checked", [[if the button is a checkbutton, whether the button is checked]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("IsColorPicker", [[whether the button's color picker icon is shown]], IGAS:GetPropertyType("boolean"))
end
